package MyGO.utils.enumerastion;

public enum Gender {
    MALE,     // 男性
    FEMALE,   // 女性
    UNKONE;   // 未知

    @Override
    public String toString() {
        return switch (this) {
            case MALE -> "男性";
            case FEMALE -> "女性";
            case UNKONE -> "未知";
        };
    }

    public static Gender parseGender(String gender) {
        return switch (gender) {
            case "男性" -> MALE;
            case "女性" -> FEMALE;
            case "未知" -> UNKONE;
            default -> null;
        };
    }
}